package org.fenixsoft.jvm.chapter10.lombok;

import lombok.val;
import lombok.var;
import org.junit.Test;

public class LombokExample {

    @Test
    public void testLombokExample(){
        val ray = new LombokJavaBean();
        ray.setAge(4);
        ray.setName("Ray");
        System.out.println(ray);

        var leo = new LombokJavaBean(4, "Ray");
        System.out.println(leo);

        System.out.println(ray.equals(leo));
    }

    @Test
    public void testLombokPOJO(){
        var ray = LombokPOJO.builder()
                .age(4)
                .name("Ray")
                .course("语文")
                .course("数学")
                .course("英语");

        var leo = LombokPOJO.builder()
                .age(4)
                .name("Leo")
                .course("语文")
                .course("数学");

        System.out.println(ray);
        System.out.println(leo);
        System.out.println(ray.equals(leo));
    }
}
